package edu.ptu.acl.dto;

import edu.ptu.acl.entity.RoleModule;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import javax.annotation.sql.DataSourceDefinition;
import java.util.List;

@Data
public class RoleModuleTreeDto extends RoleModule {

    private List<RoleModuleTreeDto> sonRoleModuleList;

    public static RoleModuleTreeDto copyRoleModule2Tree(RoleModule roleModule){
        RoleModuleTreeDto roleModuleTreeDto = new RoleModuleTreeDto();
        BeanUtils.copyProperties(roleModule,roleModuleTreeDto);
        return roleModuleTreeDto;
    }

}
